// pages/erp/erp.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    cartCount:0,
    ExampleImageList: [
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-1.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-2.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-3.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-4.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-5.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-6.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-7.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-8.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-9.png",
      },
      {
        src:
          "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/ERP-jump-image/ERP-example/1-10.png",
      },
    ],
    leftButtomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-3.png", id: 3, animation: null },
    ],
    communityLeftButtomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/1-3.png", id: 3, animation: null },
    ],
    communityLeftButtomListTow: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-4.png", id: 4, animation: null },
    ],
    leftButtomListTow: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/2-4.png", id: 4, animation: null },
    ],
    rightButtomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-4.png", id: 4, animation: null },
    ],
    communityRightButtomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/3-4.png", id: 4, animation: null },
    ],
    centerList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/4-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/4-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/4-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/4-4.png", id: 4, animation: null },
    ],
    centerRight: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/5-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/5-2.png", id: 2, animation: null },
    ],
    centerBottom: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/6-8.png", id: 8, animation: null },
    ],
    centerBottomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-8.png", id: 8, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-9.png", id: 9, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/7-10.png", id: 10, animation: null },
    ],
    factoryTopList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/8-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/8-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/8-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/8-1.png", id: 1, animation: null },
    ],
    factoryMainList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/9-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/9-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/9-3.png", id: 3, animation: null },
    ],

    factoryBottomList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-8.png", id: 8, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-9.png", id: 9, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-10.png", id: 10, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-11.png", id: 11, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-12.png", id: 12, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-3.png", id: 13, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-4.png", id: 14, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-7.png", id: 15, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-13.png", id: 16, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-14.png", id: 17, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-15.png", id: 18, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/10-16.png", id: 19, animation: null },
    ],
    communityBottomTopList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/11-8.png", id: 8, animation: null },
    ],
    communityBottomFooterList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-8.png", id: 8, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-2.png", id: 9, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-9.png", id: 10, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-10.png", id: 11, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-11.png", id: 12, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/12-12.png", id: 13, animation: null },
    ],
    communityMainTopList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/13-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/13-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/13-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/13-4.png", id: 4, animation: null },
    ],
    communityMainMainList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/14-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/14-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/14-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/14-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/14-4.png", id: 4, animation: null },
    ],
    communityMainFooterList: [
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-1.png", id: 1, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-2.png", id: 2, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-3.png", id: 3, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-4.png", id: 4, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-5.png", id: 5, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-6.png", id: 6, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-7.png", id: 7, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-8.png", id: 8, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-9.png", id: 9, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-10.png", id: 10, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-11.png", id: 11, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-12.png", id: 12, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-13.png", id: 13, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-14.png", id: 14, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-15.png", id: 15, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-16.png", id: 16, animation: null },
      { src: "https://jiazhiqin.oss-cn-chengdu.aliyuncs.com/mini-program/community-image/15-17.png", id: 17, animation: null }
    ],
  },

  /**
   * 生命周期函数--监听页面加载
   */

  onLoad(options) {
    setTimeout(() => {
      this.leftBottom(this.data.leftButtomList);
    }, 1000);
    setTimeout(() => {
      this.communityLeftBottom(this.data.leftButtomList);
    }, 1000);
    setTimeout(() => {
      this.leftTwoBottom(this.data.leftButtomListTow);
    }, 1000);
    setTimeout(() => {
      this.rightBottom(this.data.rightButtomList);
    }, 1000);
    setTimeout(() => {
      this.center(this.data.centerList);
    }, 1000);
    setTimeout(() => {
      this.factoryBottom(this.data.factoryBottomList);
    }, 5000);
    setTimeout(() => {
      this.factoryMain(this.data.factoryMainList);
    }, 5000);
    setTimeout(() => {
      this.factoryTop(this.data.factoryTopList);
    }, 5000);
    setTimeout(() => {
      this.communityBottomTop(this.data.communityBottomTopList);
    }, 14000);
    setTimeout(() => {
      this.communityBottomFooter(this.data.communityBottomFooterList);
    }, 14000);
    setTimeout(() => {
      this.communityMainTop(this.data.communityMainTopList);
    }, 14000);
    setTimeout(() => {
      this.communityMainMain(this.data.communityMainMainList);
    }, 14000);
    setTimeout(() => {
      this.communityMainFooter(this.data.communityMainFooterList);
    }, 14000);
    setTimeout(() => {
      this.communityRightBottom(this.data.communityRightButtomList);
    }, 14000);
  },

  leftBottom() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityLeftButtomList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityLeftButtomList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityMainTop() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityMainTopList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("200rpx") // 开始时向下移动
        .opacity(0) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityMainTopList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityMainFooter() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 100; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityMainFooterList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("200rpx") // 开始时向下移动
        .opacity(0) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityMainFooterList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityMainMain() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityMainMainList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("200rpx") // 开始时向下移动
        .opacity(0) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityMainMainList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityBottomTop() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityBottomTopList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-100rpx") // 开始时向下移动
        .opacity(0) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityBottomTopList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityBottomFooter() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityBottomFooterList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-100rpx") // 开始时向下移动
        .opacity(0) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityBottomFooterList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityLeftBottom() {
    const duration = 500; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.leftButtomList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-420rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }) // 设置延迟
      this.setData({
        [`leftButtomList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  factoryTop() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.factoryTopList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateY("-100rpx") // 开始时向下移动
        .opacity(0)
        .step({ delay: index * delayBetweenAnimations })
        .translateY("0rpx") // 开始时向下移动
        .opacity(1)
        .step({ delay: index * delayBetweenAnimations });
      this.setData({
        [`factoryTopList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  factoryMain() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.factoryMainList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-100rpx") // 开始时向下移动
        .opacity(0)
        .step({ delay: index * delayBetweenAnimations })
        .translateX("0rpx") // 开始时向下移动
        .opacity(1)
        .step({ delay: index * delayBetweenAnimations });
      this.setData({
        [`factoryMainList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  factoryBottom() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 100; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.factoryBottomList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateY("20rpx") // 开始时向下移动
        .opacity(0)
        .step({ delay: index * delayBetweenAnimations })
        .translateY("-20rpx") // 开始时向下移动
        .opacity(0)
        .step({ delay: index * delayBetweenAnimations })
        .translateY("0rpx") // 开始时向下移动
        .opacity(1)
        .step(); // 设置延迟
      this.setData({
        [`factoryBottomList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  leftTwoBottom() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.leftButtomListTow.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-570rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`leftButtomListTow[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityLeftTwoBottom() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityLeftButtomListTow.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityLeftButtomListTow[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  rightBottom() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.rightButtomList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("-600rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`rightButtomList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  communityRightBottom() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.communityRightButtomList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`communityRightButtomList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  center() {
    const duration = 1000; //持续时长
    const delayBetweenAnimations = 200; //每张图片动画的延迟，这里的延迟主要是在下面使用
    this.data.centerList.forEach((image, index) => {
      const animation = wx.createAnimation({
        duration: duration,
        timingFunction: "ease-in-out",
      });
      // 为每张图片创建一个动画，注意这里设置的是动画间隔，不是步骤间隔
      animation
        // 如果要设置为只向上的话就只需要前面的一开始就向上，然后再回到原为即可
        .translateX("0rpx") // 开始时向下移动
        .opacity(1) // 开始时透明度为0
        .step({ delay: index * delayBetweenAnimations }); // 设置延迟
      this.setData({
        [`centerList[${index}].animation`]: animation.export(), // 导出动画
      });
    });
  },
  showImageFullScreen(event) {
    let arr = [];
    arr.push(event.target.dataset.parmas);
    wx.previewImage({
      urls: arr, //imgUrl 必须是需要预览的图片链接列表，只有一张图片也需要是列表
      success: (res) => {
        console.log("接口调用成功", res);
      },
    });
  },
  goback() {
    wx.navigateBack({
      delta: 1,
    });
  },
  gocell() {
    wx.makePhoneCall({
      phoneNumber: "18881685181",
    });
  },
  getOrderList() {
    const count = wx.getStorageSync("count");
    this.setData({
      cartCount: count,
    });
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.getOrderList()
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {},

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {},

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {},

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (options) {
    return {
      title: "嘉之勤官网小程序",
      path: "/pages/index/index",
      imageUrl:
        "https://youyougo2.oss-cn-chengdu.aliyuncs.com/0201506f6fc0f4145e34159c2e2ac66b94b96450dd29e5a19d177edc5dad8023.png",
    };
  },
});
